package com.ifp.opengate.boot.constants;

/**
 * @author 灭霸 2018年11月1日
 */
public class Constants {
    public static final String ALL_CHAR = "all";
    public static final String REQUEST_TYPE_M = "M";
    public static final String REQUEST_TYPE_GXV = "GXV";
    public static final String REQUEST_TYPE_O = "O";
    public static final String CHARSET = "charset";
    // AES
    public static final String AES = "AES";
    // RSA
    public static final String RSA = "RSA";
    // null
    public static final String NULL = "null";
    // 开放平台放重复提交缓存名称
    public static final String ACCESS_REPEAT_CACHE_NAME = "accessRepeat";
    // 开放平台缓存名称
    public static final String OPEN_GATE_CACHE_NAME = "opengate";
    // opengate
    public static final String OPEN_GATE = "opengate";
    // RegistryConfig
    public static final String REGISTRY_CONFIG = "RegistryConfig";
    // Service单词
    public static final String SERVICE = "Service";
    // Action单词
    public static final String ACTION = "Action";
    public static final String MVC_COMMON = "mvcCommon";
    // 订阅单词
    public static final String SUBSCRIBER = "Subscriber";
    // 消息内容
    public static final String MESSAGECONTEXT = "messageContext";
    // 错误码
    public static final String ERROR_CODE = "errorCode";
    // 错误信息
    public static final String ERROR_MSG = "errorMsg";
    // rpc协议
    public static final String RPC = "rpc";
    // tpc协议
    public static final String TCP = "tcp";
    // http协议
    public static final String HTTP = "http";

    // 对内订阅系统编号
    public static final String SUBCRIBE_SYSTEM_ID = "systemId";
    // 对内订阅服务编号（接口编号）
    public static final String SUBCRIBE_SERVICE_CODE = "protoclCode";
    // 对内订阅服务编号（接口编号）
    public static final String SUBCRIBE_VERSION = "protocolVersion";
    // 对内订阅服务组
    public static final String SUBCRIBE_GROUP = "protocolGroup";
    // 对内订阅类Class
    public static final String SUBCRIBE_CLASS = "protocolClass";
    // 对内订阅类执行方法名
    public static final String SUBCRIBE_METHOD_NAME = "methodName";
    // 对内订阅类执行次数
    public static final String SUBCRIBE_RETRIES = "protocolRetries";
    // 内部服务所用协议
    public static final String SUBCRIBE_PROTOCOL = "protocol";
    // 内部服务订阅地址
    public static final String SUBCRIBE_ADDR = "subscribeAddr";
    // 请求报文类型
    public static final String SUBCRIBE_TYPE = "subscribeType";
    // 系统通讯连接器主键码
    public static final String SUBCRIBE_ROUTE_CODE = "routeCode";
    public static final String MERCHANT_NO = "merchantNo";
    // 商户号（旧商户）
    // 商户状态
    public static final String MERCHANT_STATE = "merchantState";
    public static final String CHANNEL_CODE = "channelCode";
    // 商户号EXT
    public static final String MERCHANT_NO_EXT = "merchantNoExt";
    // 请求模式：api-开发服务，out-内部服务，ext-旧商户
    public static final String REQUEST_MODE = "requestMode";

    // api 前缀
    public static final String API = "api_";
    // 新旧接口 映射 前缀z
    public static final String API_APPING = "api_mapping_";
    // 商户-应用 前缀
    public static final String MERCHANT_APP_ = "merchant_app_";
    // apiId
    public static final String API_ID = "apiId";
    // api 名称
    public static final String API_NAME = "apiName";
    // 日志mq键值对，临时存储
    public static final String LOG_MA_MAP = "logMqMap";
    // 交易码
    public static final String TRANCODE = "tranCode";
    // 交易码
    public static final String TRANCODE_NAME = "交易码";
    // 产品ID
    public static final String PRD_ID = "prdId";
    // 产品 名称
    public static final String PRD_NAME = "prdName";
    // appID
    public static final String APP_ID = "appId";
    // appID
    public static final String API_VERSION = "apiVersion";
    // appID
    public static final String VERSION = "version";
    // envType
    public static final String ENV_TYPE = "envType";
    // appID
    public static final String APP_ID_NAME = "应用ID";
    // app密钥
    public static final String APP_SECRET = "appSecret";
    // signData
    public static final String SIGN_DATA = "signData";
    // 请求id
    public static final String REQUEST_ID = "requestId";
    // 响应id
    public static final String RESPONSE_ID = "responseId";
    // 响应时间
    public static final String RESPONSE_TIME = "responseTime";
    // 加密源数据
    public static final String SRC_ENCRYPT_DATA = "srcEncryptData";

    public static final String CONTEXT_LENGTH = "context-length";
    public static final String DYNAMIC_DEPLOY = "Dynamic.deploy";
    // 系统id（esb、osb）
    public static final String TEMPLATE_SYSTEMID = "systemId";
    // 模板内容
    public static final String TEMPLATE_TEMPLATE = "template";
    // 交易码
    public static final String TEMPLATE_TRACSCODE = "transCode";
    // 模板类型
    public static final String TEMPLATE_TYPE = "type";
    // 错误码管理级别
    public static final String ERROR_CODE_LEVEL = "level";
    // 新错误码
    public static final String NEW_ERROR_CODE = "emiNewErrCode";
    // 新错误信息
    public static final String NEW_ERROR_MSG = "emiErrorMsg";

    public static final String ISTRUN = "ISTRUN";

    public static final String SPLIT_STR = "\\|\\|";
    /**
     * 符号‘/’
     */
    public static final String SLASH_LEFT = "/";
    // app缓存key前缀
    public static final String APP_INFO_PREFIX = "app_info_";

    // api缓存key前缀
    public static final String API_INFO_PREFIX = "api_info_";
    // api,protocol关联key前缀
    public static final String API_PROTOCOL_REL_PREFIX = "api_protocol_rel_";
    // api_protocol key前缀
    public static final String API_PROTOCOL_PREFIX = "api_protocol_";
    // 所有待发布api缓存
    public static final String API_INFO_ALL = "opengate_api_info_*";
    // 所有应用缓存
    public static final String APP_INFO_ALL = "opengate_app_info_*";

    // 所有产品缓存
    public static final String PRODUCT_INFO_ALL = "access_control_product";

    // 所有appSecret缓存
    public static final String APP_SECRET_ALL = "*app_secret_*";
    // appSecret缓存key前缀
    public static final String APP_SECRET_PREFIX = "app_secret_";
    // api报文模板缓存key前缀
    public static final String API_TEMPLATE_PREFIX = "api_template_";
    // 所有待部署api报文模板
    public static final String API_TEMPLATE_ALL = "*api_template_*";
    // 所有密钥缓存
    public static final String SECRET_INFO_ALL = "secret_info_*";
    // 密钥前缀
    public static final String SECRET_INFO_PREFIX = "secret_info_prod_";
    // app prd缓存key前缀
    public static final String APP_PRD_PREFIX = "appPrd";

    public static final String REQUEST_TIME = "requestTime";

    public static final String TRANS_NAME = "transName";

    public static final String OPEN_GATE_ROUTE_CACHE_NAME = "opengate_route_";

    public static final String OPENGATE_API_PARAMS = "opengate_api_params_";

    public static final String OPEN_GATE_ROUTE_COMM_CACHE_NAME = "opengate_route_comm_";

    public static final String LOG_TYPE = "logType";

    public static final int CACHE_VALUE_TYPE_LIST = com.ifp.cache.common.Constants.CACHE_VALUE_TYPE_LIST;
    public static final int CACHE_VALUE_TYPE_MAP = com.ifp.cache.common.Constants.CACHE_VALUE_TYPE_MAP;
    public static final int CACHE_VALUE_TYPE_STRING = com.ifp.cache.common.Constants.CACHE_VALUE_TYPE_STRING;
    public static final int NUM_1 = com.ifp.core.base.Constants.NUM_1;
    public static final int NUM_2 = com.ifp.core.base.Constants.NUM_2;
    public static final int NUM_3 = com.ifp.core.base.Constants.NUM_3;
    public static final int FREQUENCY_CHANNEL_KEY_INDEX = 2;
    public static final int FREQUENCY_TRANSCODE_KEY_INDEX = 1;

    /**
     * 下划线
     */
    public static final String BOTTOM_LINE = "_";
    /**
     * 商户状态为销户
     */
    public static final String MERCHANT_DEL = "09";
    /**
     * 商户状态为冻结
     */
    public static final String MERCHANT_FREEZE = "02";
    /**
     * 产品状态为发布
     */
    public static final String PRD_NEW = "01";
    /**
     * 产品状态为上架
     */
    public static final String PRD_GROUNDING = "20";

    /**
     * 系统默认熔断配置
     */
    public static final String HYSTRIX_SYSTEM_COMMAND = "system_default";
    /**
     * API 维度
     */
    public static final String HYSTRIX_ACCESS_API = "API";
    /**
     * MER_API 维度
     */
    public static final String HYSTRIX_ACCESS_MER_API = "MER_API";
    /**
     * MER 维度
     */
    public static final String HYSTRIX_ACCESS_MER = "MER";
    /**
     * SYS 维度
     */
    public static final String HYSTRIX_ACCESS_SYS = "SYS";

    /**
     * 重复提交前缀
     */
    public static final String ACCESS_REPEAT = "access_repeat";

    public static final String CL_CONTEXT = "clContext";
    public static final String OUTPUT_DATAMAP = "outputDataMap";

    public static final String NEW_ROUTE = "opengate_route_%s";

    /**
     * 路由前缀
     **/
    public static final String ROUTE_INFO_ALL = "opengate_sys_route_*";

    // redis数据版本KEY
    public static final String API_DATA_VERSION = "API_DATA_VERSION";
    public static final String APP_DATA_VERSION = "APP_DATA_VERSION";

    // 通讯服务在rediskey
    public static final String CONNECTOR_SYSID = "sysId";// 系统ID
    public static final String CONNECTOR_CODE = "connectorCode";// 连接器Code
    public static final String CONNECTOR_CLASS = "connectorClass";// 连接器类名
    public static final String CONNECTOR_PROTOCOL = "protocol";// 通讯服务协议（RPC，TCP，HTTP）
    public static final String CONNECTOR_IP = "systemIP";// ip
    public static final String CONNECTOR_PORT = "systemPort";//
    public static final String CONNECTOR_SYSTEMNAME = "systemPort";//
    public static final String CONNECTOR_RESPONSEFORMATER = "responseFormater";//
    public static final String CONNECTOR_RREQUESTFORMATER = "requestFormater";//
    public static final String CONNECTOR_ENV = "env";//
    public static final String GROUP_APPID_TOKEN = "opengate_group_appId_token";//
    public static final String OPEN_GATE_API_CONNECTOR = "opengate_api_connector_";// api与通信服务
    public static final String COMMICATION_PROTOCLID = "protocolId";
    public static final String COMMICATION_PROTOCOL_HEALTH_STATUS = "opengate_comm_protocol_health_inf";
    public static final String CAT_TRANSACTION = "transations";
    public static final String TRANSACTION = "transaction";
    public static final String ISSTATISTICS = "isstatistics";

    public static final String GLOBALLOGID = "logId";
    public static final String OPENGATE_GROUP_API = "opengate_group_api";
    public static final String OPENGATE_API_PROTOCOL_REL = "opengate_api_protocol_rel_";
    public static final String OPENGATE_API_PROTOCOL_ = "opengate_api_protocol_";
    // 动态路由组
    public static final String OPENGATE_GROUP_DYNAROUTE = "opengate_group_dynaRoute";
    public static final String OPENGATE_GROUP_COMM_RULE_REL = "opengate_group_comm_rule_rel";
    public static final String OPENGATE_GROUP_RULE_INFO = "opengate_group_rule_info";
    // 密钥组
    public static final String OPENGATE_GROUP_SECRET = "opengate_group_secret";

    // 服务分组Id 2020/5/21
    public static final String API_GROUP_ID = "serviceGroupId";
    public static final String API_GROUP = "apiGroup";

    // 密钥管理 merchantSignPublicKeyValue、merchantEncryptPublicKeyValue
    // 、platformEncryptPrivateKeyName、platformSignPrivateKeyName、
    /** 行内验签公钥，由合作方生成密钥对，对请求报文进行验签 */
    public static final String MER_SIGN_PUBLIC_KEY_VALUE = "merchantSignPublicKeyValue";
    public static final String MER_SIGN_PUBLIC_KEY_NAME = "merchantSignPublicKeyName";
    /** 行内解密公钥，由合作方生成密钥对，对请求报文进行解密 */
    public static final String MER_CIPHER_PUBLIC_KEY_VALUE = "merchantEncryptPublicKeyValue";
    public static final String MER_CIPHER_PUBLIC_KEY_NAME = "merchantEncryptPublicKeyName";
    /** 行内解密私钥，对请求报文进行解密 */
    public static final String PLAT_CIPHER_PRIVATE_KEY_NAME = "platformEncryptPrivateKeyName";
    /** 行内签名私钥，对返回报文进行加签 */
    public static final String PLAT_SIGN_PRIVATE_KEY_NAME = "platformSignPrivateKeyName";
    /** 分段加密 对接密码平台所定义的key */
    public static final String FRAGMENT_KEY = "fmKey";
    /** 平台密钥有效开始时间 */
    public static final String PLAT_VALID_START_TIME = "platInvalidTime";
    /** 平台密钥有效结束时间 */
    public static final String PLAT_VALID_END_TIME = "platValidTime";
    /** 合作方密钥有效开始时间 */
    public static final String MER_VALID_START_TIME = "merchantInvalidTime";
    /** 合作方密钥有效结束时间 */
    public static final String MER_INVALID_END_TIME = "merchatValidTime";

    /** 网关一次请求所用的临时变量前缀 */
    public static final String GW_TEMP_KEY = "gw_temp_key_";

    public static final String ALL_SYS = "100000001";
    /**
     * 交互平台 响应业务错误码
     */
    public static final String JH_BUSINESS_RESPONSE_CODE = "respCode";
    /**
     * 交互平台 响应业务错误信息
     */
    public static final String JH_BUSINESS_RESPONSE_MSG = "respMsg";

    public static final String REQUEST_IP = "requestIP";
    public static final String CHNLID = "chnlId";
    public static final String APPID = "appId";
    public static final String REQTIME = "reqTime";
    public static final String REQUESTTIMESS = "requestTimeSs";
    public static final String REQUESTDAY = "requestDay";
    public static final String REQUESTTIME = "requestTime";
    public static final String CHANNELID = "channelId";
    public static final String CLIENTTYP = "clientTyp";
    public static final String CHNLCD = "chnlCd";
    public static final String SRVSYSCD = "srvSysCd";
    public static final String SRVIP = "srvIp";
    public static final String HOSTIP = "hostIp";
    public static final String REQIP = "reqIP";
    public static final String BIZTRACKNO = "bizTrackNo";
    public static final String REQSEQNO = "reqSeqNo";
    public static final String BZTRANSID = "bzTransId";
    public static final String TRANSID = "transId";
    public static final String SERVCID = "servcId";
    public static final String SERVICECODE = "serviceCode";
    public static final String BZTRANSID_VALUE = "200011000001";
    public static final String TRANSID_VALUE = "336000001";
    public static final String OPEN = "OPEN";
    public static final String APPSIGN = "appSign";
    public static final String USERRANK = "userRank";
    public static final String ORIGINALTRANSID = "originalTransId";
    public static final String CACHEID = "cacheId";
    public static final String RPTCONTENT = "rptContent";
    public static final String DATASIGN = "dataSign";
    public static final String HOSTNAME = "hostName";
    public static final String SERVICEADDRESS = "serviceAddress";
    public static final String CALLBACKURI = "callbackUri";
    public static final String SCENECD = "sceneCd";
    public static final String SERVICETARGET = "serviceTarget";
    public static final String DATASIGN_VALUE = "b992c8a1cc76d1e28a432b65b77dfbad";
    public static final String DATASIGN035_VALUE = "5c27bf5a74b1fcf6974a2aa7c2347c4f";
    public static final String DATASIGN036_VALUE = "ac51d9438491ab9313852805c67ac9e8";
}
